Layouts

Load cuxfilter and data

[1]:
from cuxfilter import charts
import cuxfilter
from bokeh import palettes
cux_df = cuxfilter.DataFrame.from_arrow('../../../data/146M_predictions_v2.arrow')

Declare charts

[2]:
#tile provider for choropleth map
chart0 = charts.choropleth(x='zip', y='delinquency_12_prediction', color_column='delinquency_12_prediction', color_aggregate_fn='mean',
                                  geo_color_palette=palettes.Purples9,
                                  geoJSONSource = 'https://raw.githubusercontent.com/rapidsai/cuxfilter/GTC-2018-mortgage-visualization/javascript/demos/GTC%20demo/public/data/zip3-ms-rhs-lessprops.json',
                                  data_points=1000, nan_color='white')
chart1 = charts.bar('dti')
chart2 = charts.bar('delinquency_12_prediction')
chart3 = charts.line('borrower_credit_score',step_size=1)
chart4 = charts.bar('seller_name',data_points=100)
chart5 = charts.line(x='loan_id',y='current_actual_upb')
chart6 = charts.line('dti')
chart7 = charts.line('delinquency_12_prediction')
chart8 = charts.bar('borrower_credit_score', data_points=100)
chart_widget = charts.multi_select('dti')

#create a list of charts
charts_list = [chart_widget, chart0, chart3, chart1, chart2, chart4, chart5, chart6, chart7, chart8]

Layout Types

1. Single feature

bb2c702a126b4bbba2abd4896762ea09

[3]:
d = cux_df.dashboard(charts_list, layout=cuxfilter.layouts.single_feature, theme=cuxfilter.themes.rapids, title="Layout - single feature")
await d.preview()
../_images/layouts_Layouts_8_2.png

2. Feature and base

5d379cc960f043519ee6e427f19fec34

[4]:
d = cux_df.dashboard(charts_list, layout=cuxfilter.layouts.feature_and_base, theme=cuxfilter.themes.rapids, title="Layout - feature and base")
await d.preview()
../_images/layouts_Layouts_11_2.png

3. Double feature

20b1fe7f777d4631af87a4f55f849608

[5]:
d = cux_df.dashboard([chart_widget, chart0, chart1], layout=cuxfilter.layouts.double_feature, theme=cuxfilter.themes.rapids, title="Layout - double feature")
await d.preview()
../_images/layouts_Layouts_14_2.png

4. Left feature right double

b5ea6c20efe94107b35c55cdecd98fb7

[6]:
d = cux_df.dashboard(charts_list, layout=cuxfilter.layouts.left_feature_right_double, theme=cuxfilter.themes.rapids, title="Layout - left feature right double")
await d.preview()
../_images/layouts_Layouts_17_2.png

5. Triple feature

38f5f6c948cf487ba7d87aff10944cb5

[7]:
d = cux_df.dashboard([chart_widget, chart1, chart2, chart3], layout=cuxfilter.layouts.triple_feature, theme=cuxfilter.themes.rapids, title="Layout - triple feature")
await d.preview()
../_images/layouts_Layouts_20_2.png

6. Feature and double base

efe02669b3d644038290be73ef9e338b

[8]:
d = cux_df.dashboard([chart_widget, chart0, chart2, chart3], layout=cuxfilter.layouts.feature_and_double_base, theme=cuxfilter.themes.rapids, title="Layout - feature and double base")
await d.preview()
../_images/layouts_Layouts_23_2.png

7. Two by two

27fd1ca7b7214d18aada7ad2b159e61e

[9]:
d = cux_df.dashboard([chart_widget, chart0, chart2, chart3, chart4], layout=cuxfilter.layouts.two_by_two, theme=cuxfilter.themes.rapids, title="Layout - two by two")
await d.preview()
../_images/layouts_Layouts_26_2.png

8. Feature and triple base

fc7680736b784a5ab77f51bbed11ba00

[10]:
d = cux_df.dashboard(charts_list, layout=cuxfilter.layouts.feature_and_triple_base, theme=cuxfilter.themes.rapids, title="Layout - feature and triple base")
await d.preview()
../_images/layouts_Layouts_29_2.png

9. Feature and quad base

40ad01c0280e4b8fbefcdc3c394ced78

[11]:
d = cux_df.dashboard(charts_list, layout=cuxfilter.layouts.feature_and_quad_base, theme=cuxfilter.themes.rapids, title="Layout - feature and quad base")
await d.preview()
../_images/layouts_Layouts_32_2.png

10. Feature and five edge

ec148a1ed5a2459c8cddc7aebb270563

[12]:
d = cux_df.dashboard(charts_list, layout=cuxfilter.layouts.feature_and_five_edge, theme=cuxfilter.themes.rapids, title="Layout - feature and five edge")
await d.preview()
../_images/layouts_Layouts_35_2.png

11. Two by three

8bd04c68505640c5bf119542e194bfa5

[13]:
d = cux_df.dashboard([chart_widget, chart3, chart1, chart2, chart4, chart5, chart6], layout=cuxfilter.layouts.two_by_three, theme=cuxfilter.themes.rapids, title="Layout - two by three")
await d.preview()
../_images/layouts_Layouts_38_2.png

12. Double feature quad base

1564b020bd9e46baaae40de11005eda9

[14]:
d = cux_df.dashboard(charts_list, layout=cuxfilter.layouts.double_feature_quad_base,
                     theme=cuxfilter.themes.rapids, title="Layout - double feature quad base")
await d.preview()
../_images/layouts_Layouts_41_2.png

13. Three by three

1fe3bbbc396b4817bc202bb810015ecf

[15]:
d = cux_df.dashboard(charts_list[2:], layout=cuxfilter.layouts.three_by_three,
                     theme=cuxfilter.themes.rapids, title="Layout - three by three")
[16]:
await d.preview()
../_images/layouts_Layouts_45_0.png